package ui.graphic; 

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.io.IOException;
import java.net.URL;
import java.util.Observable;
import java.util.Observer;
import javax.imageio.ImageIO;
import javax.swing.JPanel;

/** 
 * 
 * @author gustavodinis 
 */ 
public class InitGUI extends JPanel implements Observer{ 
    
    Image logo;
    URL logoPath;
    
    public InitGUI() {
       setSize(675,443);
        logoPath = getClass().getResource("resources/images/splash.jpg");
        try{
           logo = ImageIO.read(logoPath);
        }catch (IOException ex){
            System.out.println("imagem erro");
        }
        setVisible(true);
    }
    

     @Override
    public void paintComponent(Graphics g) {
        super.paintComponent(g);
        Graphics2D g2d = (Graphics2D) g;
        g2d.drawImage(logo, 0, 0, 675, 443, this);
        
    }
    
    
    @Override
    public void update(Observable o, Object arg) {
        repaint();
    }


} 